Monte Carlo Algorithm for Stage Climbing Problem

The problem consists of several levels that have different probabilties and different length.
If you have successively passed the time units on one level, you rise to the next level.
You fall to a lower level with a certain probability in each time unit that you spend on a certain level.
If you fall to a lower level, you have to spend the time at this level again, with the risk of falling again to a lower level.
If the time you need is greater than the time you have provided, you fail.
If it is smaller or equal to the time provided, you win and the time needed is given out.
You can test with certain amounts of time and certain probabilities on each level by setting the input parameters.
Also you can set how often you want the function to run.
The value that is returned for 'PercentageOfWin' is the percentage you win with the chosen parameters.

Java Code

Titel Link
Monte Carlo Algorithm for Stage Climbing Problem Java Code java